package com.web.common.dataDictionary.PO;

import java.util.*;
import com.css.sword.kernel.base.annotation.*;
import com.css.sword.kernel.base.dataElement.*;
import com.css.sword.kernel.base.exception.SwordBaseCheckedException;

import com.web.common.dataDictionary.DE.DE_QRCODE_ID;
import com.web.common.dataDictionary.DE.DE_ACTIVITYID;
import com.web.common.dataDictionary.DE.DE_WEBUSERNAME;
import com.web.common.dataDictionary.DE.DE_QRCODE_TYPE;
import com.web.common.dataDictionary.DE.DE_QRCODE_ADDWEALTH;
import com.web.common.dataDictionary.DE.DE_QRCODE_IMGPATH;
import com.web.common.dataDictionary.DE.DE_QRCODE_IMGDOMAIN;
import com.web.common.dataDictionary.DE.DE_QRCODE_PASSWORD;
import com.web.common.dataDictionary.DE.DE_QRCODE_SMCS;
import com.web.common.dataDictionary.DE.DE_QRCODE_OPPTIME;
import com.web.common.dataDictionary.DE.DE_QRCODE_INFO;
import com.web.common.dataDictionary.DE.DE_QRCODE_BEIZHU;


/**
 * 二维码表
 */
@PersistObject
public class TabQrcodePO extends AbsPersistObject {
	//private static final long serialVersionUID = 1038968292100951230L;
	private static final long serialVersionUID = 1L;
	private static final Map<String, Integer> fieldIndex = new HashMap<String, Integer>(12);
	private static final BitSet HAS_DEFAULT_VALUE = new BitSet(12);
	
	static{
		HAS_DEFAULT_VALUE.set(8, true);
		fieldIndex.put("qrcodeId",0);fieldIndex.put("activityid",1);fieldIndex.put("webusername",2);fieldIndex.put("qrcodeType",3);fieldIndex.put("qrcodeAddwealth",4);fieldIndex.put("qrcodeImgpath",5);fieldIndex.put("qrcodeImgdomain",6);fieldIndex.put("qrcodePassword",7);fieldIndex.put("qrcodeSmcs",8);fieldIndex.put("qrcodeOpptime",9);fieldIndex.put("qrcodeInfo",10);fieldIndex.put("qrcodeBeizhu",11);
	}
	
	/**
	 * 物理表名
	 */
	public static final String TABLE_NAME = "tab_qrcode";

	/**
	 * 二维码主键id
	 */
	private DE_QRCODE_ID qrcodeId = DE_QRCODE_ID.getTemplateInstance();

	/**
	 * 二维码对应的活动id
	 */
	private DE_ACTIVITYID activityid = DE_ACTIVITYID.getTemplateInstance();

	/**
	 * web用户名
	 */
	private DE_WEBUSERNAME webusername = DE_WEBUSERNAME.getTemplateInstance();

	/**
	 * 二维码类型
	 */
	private DE_QRCODE_TYPE qrcodeType = DE_QRCODE_TYPE.getTemplateInstance();

	/**
	 * 用户扫二维码后新增财富值
	 */
	private DE_QRCODE_ADDWEALTH qrcodeAddwealth = DE_QRCODE_ADDWEALTH.getTemplateInstance();

	/**
	 * 二维码图片path
	 */
	private DE_QRCODE_IMGPATH qrcodeImgpath = DE_QRCODE_IMGPATH.getTemplateInstance();

	/**
	 * 二维码图片存放主路径
	 */
	private DE_QRCODE_IMGDOMAIN qrcodeImgdomain = DE_QRCODE_IMGDOMAIN.getTemplateInstance();

	/**
	 * 二维码密码
	 */
	private DE_QRCODE_PASSWORD qrcodePassword = DE_QRCODE_PASSWORD.getTemplateInstance();

	/**
	 * 二维码扫描次数
	 */
	private DE_QRCODE_SMCS qrcodeSmcs = DE_QRCODE_SMCS.getTemplateInstance();

	/**
	 * 操作时间
	 */
	private DE_QRCODE_OPPTIME qrcodeOpptime = DE_QRCODE_OPPTIME.getTemplateInstance();

	/**
	 * 二维码对应的字符串信息
	 */
	private DE_QRCODE_INFO qrcodeInfo = DE_QRCODE_INFO.getTemplateInstance();

	/**
	 * 二维码备注说明
	 */
	private DE_QRCODE_BEIZHU qrcodeBeizhu = DE_QRCODE_BEIZHU.getTemplateInstance();


	public TabQrcodePO(){
		this.insertState = new BitSet(12);
		this.updateState = new BitSet(12);
	}

	
	/**
	 * 获取 "二维码主键id" 值
	 */	
	public DE_QRCODE_ID getQrcodeId(){
		return  qrcodeId;
	}
	
	/**
	 * 设置 "二维码主键id" 值
	 */
	public void setQrcodeId(DE_QRCODE_ID qrcodeId) {
		if(qrcodeId == null){
			qrcodeId= DE_QRCODE_ID.getTemplateInstance();
		}
		recordChangeFlag(0);
		this.qrcodeId = qrcodeId;
	}
	
	/**
	 * 获取 "二维码对应的活动id" 值
	 */	
	public DE_ACTIVITYID getActivityid(){
		return  activityid;
	}
	
	/**
	 * 设置 "二维码对应的活动id" 值
	 */
	public void setActivityid(DE_ACTIVITYID activityid) {
		if(activityid == null){
			activityid= DE_ACTIVITYID.getTemplateInstance();
		}
		recordChangeFlag(1);
		this.activityid = activityid;
	}
	
	/**
	 * 获取 "web用户名" 值
	 */	
	public DE_WEBUSERNAME getWebusername(){
		return  webusername;
	}
	
	/**
	 * 设置 "web用户名" 值
	 */
	public void setWebusername(DE_WEBUSERNAME webusername) {
		if(webusername == null){
			webusername= DE_WEBUSERNAME.getTemplateInstance();
		}
		recordChangeFlag(2);
		this.webusername = webusername;
	}
	
	/**
	 * 获取 "二维码类型" 值
	 */	
	public DE_QRCODE_TYPE getQrcodeType(){
		return  qrcodeType;
	}
	
	/**
	 * 设置 "二维码类型" 值
	 */
	public void setQrcodeType(DE_QRCODE_TYPE qrcodeType) {
		if(qrcodeType == null){
			qrcodeType= DE_QRCODE_TYPE.getTemplateInstance();
		}
		recordChangeFlag(3);
		this.qrcodeType = qrcodeType;
	}
	
	/**
	 * 获取 "用户扫二维码后新增财富值" 值
	 */	
	public DE_QRCODE_ADDWEALTH getQrcodeAddwealth(){
		return  qrcodeAddwealth;
	}
	
	/**
	 * 设置 "用户扫二维码后新增财富值" 值
	 */
	public void setQrcodeAddwealth(DE_QRCODE_ADDWEALTH qrcodeAddwealth) {
		if(qrcodeAddwealth == null){
			qrcodeAddwealth= DE_QRCODE_ADDWEALTH.getTemplateInstance();
		}
		recordChangeFlag(4);
		this.qrcodeAddwealth = qrcodeAddwealth;
	}
	
	/**
	 * 获取 "二维码图片path" 值
	 */	
	public DE_QRCODE_IMGPATH getQrcodeImgpath(){
		return  qrcodeImgpath;
	}
	
	/**
	 * 设置 "二维码图片path" 值
	 */
	public void setQrcodeImgpath(DE_QRCODE_IMGPATH qrcodeImgpath) {
		if(qrcodeImgpath == null){
			qrcodeImgpath= DE_QRCODE_IMGPATH.getTemplateInstance();
		}
		recordChangeFlag(5);
		this.qrcodeImgpath = qrcodeImgpath;
	}
	
	/**
	 * 获取 "二维码图片存放主路径" 值
	 */	
	public DE_QRCODE_IMGDOMAIN getQrcodeImgdomain(){
		return  qrcodeImgdomain;
	}
	
	/**
	 * 设置 "二维码图片存放主路径" 值
	 */
	public void setQrcodeImgdomain(DE_QRCODE_IMGDOMAIN qrcodeImgdomain) {
		if(qrcodeImgdomain == null){
			qrcodeImgdomain= DE_QRCODE_IMGDOMAIN.getTemplateInstance();
		}
		recordChangeFlag(6);
		this.qrcodeImgdomain = qrcodeImgdomain;
	}
	
	/**
	 * 获取 "二维码密码" 值
	 */	
	public DE_QRCODE_PASSWORD getQrcodePassword(){
		return  qrcodePassword;
	}
	
	/**
	 * 设置 "二维码密码" 值
	 */
	public void setQrcodePassword(DE_QRCODE_PASSWORD qrcodePassword) {
		if(qrcodePassword == null){
			qrcodePassword= DE_QRCODE_PASSWORD.getTemplateInstance();
		}
		recordChangeFlag(7);
		this.qrcodePassword = qrcodePassword;
	}
	
	/**
	 * 获取 "二维码扫描次数" 值
	 */	
	public DE_QRCODE_SMCS getQrcodeSmcs(){
		return  qrcodeSmcs;
	}
	
	/**
	 * 设置 "二维码扫描次数" 值
	 */
	public void setQrcodeSmcs(DE_QRCODE_SMCS qrcodeSmcs) {
		if(qrcodeSmcs == null){
			qrcodeSmcs= DE_QRCODE_SMCS.getTemplateInstance();
		}
		recordChangeFlag(8);
		this.qrcodeSmcs = qrcodeSmcs;
	}
	
	/**
	 * 获取 "操作时间" 值
	 */	
	public DE_QRCODE_OPPTIME getQrcodeOpptime(){
		return  qrcodeOpptime;
	}
	
	/**
	 * 设置 "操作时间" 值
	 */
	public void setQrcodeOpptime(DE_QRCODE_OPPTIME qrcodeOpptime) {
		if(qrcodeOpptime == null){
			qrcodeOpptime= DE_QRCODE_OPPTIME.getTemplateInstance();
		}
		recordChangeFlag(9);
		this.qrcodeOpptime = qrcodeOpptime;
	}
	
	/**
	 * 获取 "二维码对应的字符串信息" 值
	 */	
	public DE_QRCODE_INFO getQrcodeInfo(){
		return  qrcodeInfo;
	}
	
	/**
	 * 设置 "二维码对应的字符串信息" 值
	 */
	public void setQrcodeInfo(DE_QRCODE_INFO qrcodeInfo) {
		if(qrcodeInfo == null){
			qrcodeInfo= DE_QRCODE_INFO.getTemplateInstance();
		}
		recordChangeFlag(10);
		this.qrcodeInfo = qrcodeInfo;
	}
	
	/**
	 * 获取 "二维码备注说明" 值
	 */	
	public DE_QRCODE_BEIZHU getQrcodeBeizhu(){
		return  qrcodeBeizhu;
	}
	
	/**
	 * 设置 "二维码备注说明" 值
	 */
	public void setQrcodeBeizhu(DE_QRCODE_BEIZHU qrcodeBeizhu) {
		if(qrcodeBeizhu == null){
			qrcodeBeizhu= DE_QRCODE_BEIZHU.getTemplateInstance();
		}
		recordChangeFlag(11);
		this.qrcodeBeizhu = qrcodeBeizhu;
	}


	@Override
	public BaseDataElement<?>[] fields(){
		return new BaseDataElement<?>[] {qrcodeId,activityid,webusername,qrcodeType,qrcodeAddwealth,qrcodeImgpath,qrcodeImgdomain,qrcodePassword,qrcodeSmcs,qrcodeOpptime,qrcodeInfo,qrcodeBeizhu};
	}
	
	@Override
	public String[] fieldNames() {
		return new String[]{"qrcodeId","activityid","webusername","qrcodeType","qrcodeAddwealth","qrcodeImgpath","qrcodeImgdomain","qrcodePassword","qrcodeSmcs","qrcodeOpptime","qrcodeInfo","qrcodeBeizhu"};
	}
	
	@Override
	public BaseDataElement<?> getFieldValue(String fieldName)  {
		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
		switch (index) {
		case 0 : return qrcodeId;
		case 1 : return activityid;
		case 2 : return webusername;
		case 3 : return qrcodeType;
		case 4 : return qrcodeAddwealth;
		case 5 : return qrcodeImgpath;
		case 6 : return qrcodeImgdomain;
		case 7 : return qrcodePassword;
		case 8 : return qrcodeSmcs;
		case 9 : return qrcodeOpptime;
		case 10 : return qrcodeInfo;
		case 11 : return qrcodeBeizhu;
 
		default:
			throw new IllegalArgumentException("PO对象中没有" + fieldName + "字段");
		}
	}
	
	@Override
	public TabQrcodePO setFieldValue(String fieldName, Object fieldValue) throws SwordBaseCheckedException {
		if (fieldValue != null && !(fieldValue instanceof BaseDataElement<?>)) {
			throw new SwordBaseCheckedException("字段值类型不是DataElelement子类型");
		}

		final Integer index = fieldIndex.get(fieldName);
		if (index == null) {
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}

		switch (index) {

				case 0 : {
					if (fieldValue == null) {
						setQrcodeId(null);
					} else {
						setQrcodeId((DE_QRCODE_ID) fieldValue);
					}
					return this;
				}
				
				case 1 : {
					if (fieldValue == null) {
						setActivityid(null);
					} else {
						setActivityid((DE_ACTIVITYID) fieldValue);
					}
					return this;
				}
				
				case 2 : {
					if (fieldValue == null) {
						setWebusername(null);
					} else {
						setWebusername((DE_WEBUSERNAME) fieldValue);
					}
					return this;
				}
				
				case 3 : {
					if (fieldValue == null) {
						setQrcodeType(null);
					} else {
						setQrcodeType((DE_QRCODE_TYPE) fieldValue);
					}
					return this;
				}
				
				case 4 : {
					if (fieldValue == null) {
						setQrcodeAddwealth(null);
					} else {
						setQrcodeAddwealth((DE_QRCODE_ADDWEALTH) fieldValue);
					}
					return this;
				}
				
				case 5 : {
					if (fieldValue == null) {
						setQrcodeImgpath(null);
					} else {
						setQrcodeImgpath((DE_QRCODE_IMGPATH) fieldValue);
					}
					return this;
				}
				
				case 6 : {
					if (fieldValue == null) {
						setQrcodeImgdomain(null);
					} else {
						setQrcodeImgdomain((DE_QRCODE_IMGDOMAIN) fieldValue);
					}
					return this;
				}
				
				case 7 : {
					if (fieldValue == null) {
						setQrcodePassword(null);
					} else {
						setQrcodePassword((DE_QRCODE_PASSWORD) fieldValue);
					}
					return this;
				}
				
				case 8 : {
					if (fieldValue == null) {
						setQrcodeSmcs(null);
					} else {
						setQrcodeSmcs((DE_QRCODE_SMCS) fieldValue);
					}
					return this;
				}
				
				case 9 : {
					if (fieldValue == null) {
						setQrcodeOpptime(null);
					} else {
						setQrcodeOpptime((DE_QRCODE_OPPTIME) fieldValue);
					}
					return this;
				}
				
				case 10 : {
					if (fieldValue == null) {
						setQrcodeInfo(null);
					} else {
						setQrcodeInfo((DE_QRCODE_INFO) fieldValue);
					}
					return this;
				}
				
				case 11 : {
					if (fieldValue == null) {
						setQrcodeBeizhu(null);
					} else {
						setQrcodeBeizhu((DE_QRCODE_BEIZHU) fieldValue);
					}
					return this;
				}
				
		default:
			throw new SwordBaseCheckedException("PO对象中没有" + fieldName + "字段");
		}
	
	}

	@Override
	protected TabQrcodePO clone() {
		TabQrcodePO t = new TabQrcodePO();
		
		t.setQrcodeId(this.qrcodeId);
		t.setActivityid(this.activityid);
		t.setWebusername(this.webusername);
		t.setQrcodeType(this.qrcodeType);
		t.setQrcodeAddwealth(this.qrcodeAddwealth);
		t.setQrcodeImgpath(this.qrcodeImgpath);
		t.setQrcodeImgdomain(this.qrcodeImgdomain);
		t.setQrcodePassword(this.qrcodePassword);
		t.setQrcodeSmcs(this.qrcodeSmcs);
		t.setQrcodeOpptime(this.qrcodeOpptime);
		t.setQrcodeInfo(this.qrcodeInfo);
		t.setQrcodeBeizhu(this.qrcodeBeizhu);

		return t;
	}

	@Override
	public TabQrcodePO loadMap(Map<String, Object> dataMap) throws SwordBaseCheckedException {
		Object value = null;

		if(dataMap.containsKey("qrcodeId")){
			value = dataMap.get("qrcodeId");
			
			if (value == null) {
				this.setQrcodeId(null);
			} else {
				if (value instanceof DE_QRCODE_ID) {
					this.setQrcodeId((DE_QRCODE_ID) value);
				}
			    else {
					this.setQrcodeId(new DE_QRCODE_ID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("activityid")){
			value = dataMap.get("activityid");
			
			if (value == null) {
				this.setActivityid(null);
			} else {
				if (value instanceof DE_ACTIVITYID) {
					this.setActivityid((DE_ACTIVITYID) value);
				}
			    else {
					this.setActivityid(new DE_ACTIVITYID(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("webusername")){
			value = dataMap.get("webusername");
			
			if (value == null) {
				this.setWebusername(null);
			} else {
				if (value instanceof DE_WEBUSERNAME) {
					this.setWebusername((DE_WEBUSERNAME) value);
				}
			    else {
					this.setWebusername(new DE_WEBUSERNAME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeType")){
			value = dataMap.get("qrcodeType");
			
			if (value == null) {
				this.setQrcodeType(null);
			} else {
				if (value instanceof DE_QRCODE_TYPE) {
					this.setQrcodeType((DE_QRCODE_TYPE) value);
				}
			    else {
					this.setQrcodeType(new DE_QRCODE_TYPE(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeAddwealth")){
			value = dataMap.get("qrcodeAddwealth");
			
			if (value == null) {
				this.setQrcodeAddwealth(null);
			} else {
				if (value instanceof DE_QRCODE_ADDWEALTH) {
					this.setQrcodeAddwealth((DE_QRCODE_ADDWEALTH) value);
				}
			    else {
					this.setQrcodeAddwealth(new DE_QRCODE_ADDWEALTH(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeImgpath")){
			value = dataMap.get("qrcodeImgpath");
			
			if (value == null) {
				this.setQrcodeImgpath(null);
			} else {
				if (value instanceof DE_QRCODE_IMGPATH) {
					this.setQrcodeImgpath((DE_QRCODE_IMGPATH) value);
				}
			    else {
					this.setQrcodeImgpath(new DE_QRCODE_IMGPATH(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeImgdomain")){
			value = dataMap.get("qrcodeImgdomain");
			
			if (value == null) {
				this.setQrcodeImgdomain(null);
			} else {
				if (value instanceof DE_QRCODE_IMGDOMAIN) {
					this.setQrcodeImgdomain((DE_QRCODE_IMGDOMAIN) value);
				}
			    else {
					this.setQrcodeImgdomain(new DE_QRCODE_IMGDOMAIN(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodePassword")){
			value = dataMap.get("qrcodePassword");
			
			if (value == null) {
				this.setQrcodePassword(null);
			} else {
				if (value instanceof DE_QRCODE_PASSWORD) {
					this.setQrcodePassword((DE_QRCODE_PASSWORD) value);
				}
			    else {
					this.setQrcodePassword(new DE_QRCODE_PASSWORD(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeSmcs")){
			value = dataMap.get("qrcodeSmcs");
			
			if (value == null) {
				this.setQrcodeSmcs(null);
			} else {
				if (value instanceof DE_QRCODE_SMCS) {
					this.setQrcodeSmcs((DE_QRCODE_SMCS) value);
				}
			    else {
					this.setQrcodeSmcs(new DE_QRCODE_SMCS(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeOpptime")){
			value = dataMap.get("qrcodeOpptime");
			
			if (value == null) {
				this.setQrcodeOpptime(null);
			} else {
				if (value instanceof DE_QRCODE_OPPTIME) {
					this.setQrcodeOpptime((DE_QRCODE_OPPTIME) value);
				}
				else if(value instanceof java.util.Date){
					this.setQrcodeOpptime(new DE_QRCODE_OPPTIME((java.util.Date)value));
				}
			    else {
					this.setQrcodeOpptime(new DE_QRCODE_OPPTIME(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeInfo")){
			value = dataMap.get("qrcodeInfo");
			
			if (value == null) {
				this.setQrcodeInfo(null);
			} else {
				if (value instanceof DE_QRCODE_INFO) {
					this.setQrcodeInfo((DE_QRCODE_INFO) value);
				}
			    else {
					this.setQrcodeInfo(new DE_QRCODE_INFO(value.toString()));
				}
			}
		}

		if(dataMap.containsKey("qrcodeBeizhu")){
			value = dataMap.get("qrcodeBeizhu");
			
			if (value == null) {
				this.setQrcodeBeizhu(null);
			} else {
				if (value instanceof DE_QRCODE_BEIZHU) {
					this.setQrcodeBeizhu((DE_QRCODE_BEIZHU) value);
				}
			    else {
					this.setQrcodeBeizhu(new DE_QRCODE_BEIZHU(value.toString()));
				}
			}
		}

		return this;
	}
	
	@Override
	public Map<String,Object> toMap() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("qrcodeId", qrcodeId);
		dataMap.put("activityid", activityid);
		dataMap.put("webusername", webusername);
		dataMap.put("qrcodeType", qrcodeType);
		dataMap.put("qrcodeAddwealth", qrcodeAddwealth);
		dataMap.put("qrcodeImgpath", qrcodeImgpath);
		dataMap.put("qrcodeImgdomain", qrcodeImgdomain);
		dataMap.put("qrcodePassword", qrcodePassword);
		dataMap.put("qrcodeSmcs", qrcodeSmcs);
		dataMap.put("qrcodeOpptime", qrcodeOpptime);
		dataMap.put("qrcodeInfo", qrcodeInfo);
		dataMap.put("qrcodeBeizhu", qrcodeBeizhu);
		
		return dataMap;
	}
	
	@Override
	public Map<String,Object> toMapWithDEValue() {
		Map<String,Object> dataMap = new HashMap<String,Object>();

		dataMap.put("qrcodeId", (qrcodeId==null?null:qrcodeId.value));
		dataMap.put("activityid", (activityid==null?null:activityid.value));
		dataMap.put("webusername", (webusername==null?null:webusername.value));
		dataMap.put("qrcodeType", (qrcodeType==null?null:qrcodeType.value));
		dataMap.put("qrcodeAddwealth", (qrcodeAddwealth==null?null:qrcodeAddwealth.value));
		dataMap.put("qrcodeImgpath", (qrcodeImgpath==null?null:qrcodeImgpath.value));
		dataMap.put("qrcodeImgdomain", (qrcodeImgdomain==null?null:qrcodeImgdomain.value));
		dataMap.put("qrcodePassword", (qrcodePassword==null?null:qrcodePassword.value));
		dataMap.put("qrcodeSmcs", (qrcodeSmcs==null?null:qrcodeSmcs.value));
		dataMap.put("qrcodeOpptime", (qrcodeOpptime==null?null:qrcodeOpptime.value));
		dataMap.put("qrcodeInfo", (qrcodeInfo==null?null:qrcodeInfo.value));
		dataMap.put("qrcodeBeizhu", (qrcodeBeizhu==null?null:qrcodeBeizhu.value));
		
		return dataMap;
	}
	
	@Override
	public TabQrcodePO newInstance() {
		return new TabQrcodePO();
	}
	
	@Override
	public String getTableName(){
		return TABLE_NAME;
	}
	
	@Override
	public BaseDataElement<?>[] getPrimaryKey() {
		return new BaseDataElement<?>[]{qrcodeId};
	}

	@Override
	public void checkNotNull(byte sqlType) throws SwordBaseCheckedException {
		StringBuilder errorMsg = new StringBuilder();
		// insert
		if (sqlType == 0) {
				//只校验不可为空但又没有默认值的字段
				if (qrcodeId.value == null && !HAS_DEFAULT_VALUE.get(0)) {
					errorMsg.append("字段qrcodeId不允许为空\n");
				}
				if (activityid.value == null && !HAS_DEFAULT_VALUE.get(1)) {
					errorMsg.append("字段activityid不允许为空\n");
				}
				if (webusername.value == null && !HAS_DEFAULT_VALUE.get(2)) {
					errorMsg.append("字段webusername不允许为空\n");
				}
				if (qrcodeImgpath.value == null && !HAS_DEFAULT_VALUE.get(5)) {
					errorMsg.append("字段qrcodeImgpath不允许为空\n");
				}
				if (qrcodeOpptime.value == null && !HAS_DEFAULT_VALUE.get(9)) {
					errorMsg.append("字段qrcodeOpptime不允许为空\n");
				}
				if (qrcodeInfo.value == null && !HAS_DEFAULT_VALUE.get(10)) {
					errorMsg.append("字段qrcodeInfo不允许为空\n");
				}

		}
		// update
		else if (sqlType == 1) {
		if (updateState.get(0) && qrcodeId.value == null) {
			errorMsg.append("字段qrcodeId不允许为空\n");
		}
		if (updateState.get(1) && activityid.value == null) {
			errorMsg.append("字段activityid不允许为空\n");
		}
		if (updateState.get(2) && webusername.value == null) {
			errorMsg.append("字段webusername不允许为空\n");
		}
		if (updateState.get(5) && qrcodeImgpath.value == null) {
			errorMsg.append("字段qrcodeImgpath不允许为空\n");
		}
		if (updateState.get(9) && qrcodeOpptime.value == null) {
			errorMsg.append("字段qrcodeOpptime不允许为空\n");
		}
		if (updateState.get(10) && qrcodeInfo.value == null) {
			errorMsg.append("字段qrcodeInfo不允许为空\n");
		}

		}
		
		if (errorMsg.length() > 0) {
			errorMsg.setLength(errorMsg.length() - 1);
			throw new SwordBaseCheckedException(errorMsg.toString());
		}
	}

	@Override
	public void updateLrrq(DateDE lrrq) {
	}

	@Override
	public void updateXgrq(DateDE xgrq) {
	}

	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("qrcodeId:").append(qrcodeId.value!=null?qrcodeId:"").append(" ").append("activityid:").append(activityid.value!=null?activityid:"").append(" ").append("webusername:").append(webusername.value!=null?webusername:"").append(" ").append("qrcodeType:").append(qrcodeType.value!=null?qrcodeType:"").append(" ").append("qrcodeAddwealth:").append(qrcodeAddwealth.value!=null?qrcodeAddwealth:"").append(" ").append("qrcodeImgpath:").append(qrcodeImgpath.value!=null?qrcodeImgpath:"").append(" ").append("qrcodeImgdomain:").append(qrcodeImgdomain.value!=null?qrcodeImgdomain:"").append(" ").append("qrcodePassword:").append(qrcodePassword.value!=null?qrcodePassword:"").append(" ").append("qrcodeSmcs:").append(qrcodeSmcs.value!=null?qrcodeSmcs:"").append(" ").append("qrcodeOpptime:").append(qrcodeOpptime.value!=null?qrcodeOpptime:"").append(" ").append("qrcodeInfo:").append(qrcodeInfo.value!=null?qrcodeInfo:"").append(" ").append("qrcodeBeizhu:").append(qrcodeBeizhu.value!=null?qrcodeBeizhu:"").append(" ");
		return str.toString();
	}
	
}
